#ifndef ACCESS_H
#define ACCESS_H

static inline uint8_t ldub_raw(void *ptr)
{
	return *(uint8_t *)(phys_ram_base + (uint32_t)ptr);
}

static inline uint16_t lduw_raw(void *ptr)
{
	return *(uint16_t *)(phys_ram_base + (uint32_t)ptr);
}

static inline uint32_t ldul_raw(void *ptr)
{
	return *(uint32_t *)(phys_ram_base + (uint32_t)ptr);
}
#if 0
static inline void stul_raw(void *ptr, uint32_t val)
{
	*(uint32_t *)ptr = val;
}

#define ldl_kernel(p) ldul_raw(p + phys_ram_base)
#define stl_kernel(p, v) stul_raw(p + phys_ram_base, v)
#endif

#endif